// import MyChat from '@/views/chatList/LoadableChat'
// import MyChat from '@/views/chatList/ChatList'
import loader from '@/utils/loader'
import {LoadableComponent} from 'react-loadable'
const MyChat = loader(() => import('@/views/chatList/ChatList'))
const Chat = loader(() => import('@/views/Chat'))
const Login = loader(() => import('@/views/login'))
const Discovery = loader(() => import('@/views/Discovery'))
const Mine = loader(() => import('@/views/Mine'))
const AdressBook = loader(() => import('@/views/AdressBook'))

export interface barMenu {
  title: string,
  icon: string,
  selectedIcon: string,
  to: string,
  component: any,
  hideHead?: boolean,
  hideTab?: boolean,
  isTab?: boolean
}

export const WX_MENU:barMenu[] = [
  {
    component: MyChat, 
    title: '微信', 
    icon: 'icon-paper-plane', 
    selectedIcon: 'icon-paperplane-fill', 
    to: '/',
    isTab: true,
  },
  {
    component: Chat, 
    title: '微信', 
    icon: 'icon-paper-plane', 
    selectedIcon: 'icon-paperplane-fill', 
    to: '/chat',
    hideHead: true,
    hideTab: true,
  },
  {
    component: Login, 
    title: '登录', 
    icon: 'icon-paper-plane', 
    selectedIcon: 'icon-paperplane-fill', 
    to: '/login',
    hideHead: true,
    hideTab: true,
  },
  {
    component: AdressBook, 
    title: '通讯录', 
    icon: 'icon-user-group', 
    selectedIcon: 'icon-user-group-fill', 
    to: '/friends',
    isTab: true,
  },
  {
    component: Discovery, 
    title: '发现', icon: 'icon-map', 
    selectedIcon: 'icon-map-fill', 
    to: '/find',
    isTab: true,
  },
  {
    component: Mine, 
    title: '我的', 
    icon: 'icon-account', 
    selectedIcon: 'icon-user-fill', 
    to: '/mine',
    hideHead: true,
    isTab: true,
  },
]